home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Utilities / Programming / Dialog Director 0.6 / Dialog Dumper / Dialog Dumper - Read Me next >
Encoding:
Text File  |  1997-04-17  |  5.5 KB  |  114 lines  |  [ttro/ttxt]

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12. Please note that this software is provided “as is” and without any express or implied warranties, including, without limitation, the implied warranties of merchantability and fitness for a particular purpose.
  13.  
  14. Introduction
  15.  
  16. Welcome to Dialog Dumper v0.6.  This is the first public release of the Dialog Dumper applet which is a part of the Dialog Director v0.6 distribution.  Dialog Dumper allows you to automatically convert standard Mac OS application dialog boxes into AppleScripts that can be used in conjunction with Dialog Director v0.6 to create interactive dialogs.  The advantage of this is that these dialog boxes can be created and edited using Apple’s ResEdit application.  ResEdit provides a user interface for the interactive editing of dialog layouts via direct manipulation.
  17.  
  18. Many thanks to Christopher R. Green for his help in the development and testing of Dialog Dumper.
  19.  
  20. What You Get
  21.  
  22. This document provides a very brief description of the current features and functions of Dialog Dumper.  Dialog Dumper is supplied as both an applet and the entire text of the script for that applet & the resource file containing the dialog resources used to generate its user interface.  You are free to customise it to your own particular needs.  To create the applet the script was saved from the Script Editor as a ‘Run Only’ application, with ‘Stay Open’ and ‘Never Show Startup Screen’ options checked, and the minimum and preferred memory requirements set to 600K.  A couple of example dialog resource files are also included.
  23.  
  24. What You Need to Run
  25.  
  26. To use Dialog Dumper you are required to have the following scripting additions installed on your computer:
  27.     • Dialog Director v0.6 (included)
  28.     • Resource Utilities (included)
  29.     • Jon’s Commands (from:
  30.         <ftp://mirror.apple.com/mirrors/gaea.scriptweb.com/applescript/osaxen/JonsCommands181.sit.hqx>
  31.              or
  32.         <ftp://ftp.cadence.com/pfterry/applescript/osaxen/JonsCommands181.sit.hqx>)
  33.    • Programmer’s Tool (from:
  34.         <ftp://mirror.apple.com//mirrors/gaea.scriptweb.com/applescript/osaxen/pgmTool.sit.hqx>
  35.              or
  36.         <ftp://ftp.cadence.com/pfterry/applescript/osaxen/pgmTool.sit.hqx>)
  37.  
  38. What It Does
  39.  
  40. Dialog Dumper reads each ‘DLOG’ resource in turn from a resource file and processes its contents and the contents of an associated ‘DITL’ resource.  It also extracts information from ‘CNTL’ and ‘MENU’ resources referenced by dialog items in a ‘DITL’ resource.  It is possible to use Dialog Dumper to convert dialogs taken directly from applications, desk accessories, etc.  However, they should be copied into a new resource file before use.
  41.  
  42. This release of Dialog Dumper supports the following Dialog Director features through the user interface:
  43.     • choice of Auto Dialog or Live Dialog code generation
  44.     • optional greyscale dialog look
  45.     • optional timeout for Auto Dialogs
  46.     • optionally change the default text font
  47.     • optionally change the default text size
  48.     • optionally change the default text style.
  49.  
  50. Dialog Dumper uses the following information from the ‘DLOG’ resource in its code generation:
  51.     • the name of the resource (prefixed with “d”) for name of the variable containing the dialog record
  52.     • or the resource ID prefixed with “dlog” if there is no name;
  53.     • the DLOG’s boundsRect for the dialog bounds
  54.     • or the boundsRect’s width & height for the dialog size if the top-left is (0, 0);
  55.     • the DLOG’s title for the dialog’s name;
  56.     • the DLOG’s procID for the dialog’s style;
  57.     • and the DLOG’s DITL ID to retrieve the ‘DITL’ resource for the dialog’s contents.
  58.  
  59. Dialog Dumper generates code for the following dialog item classes.  This information is extracted from the ‘DITL’ resource:
  60.     • push button
  61.     • check box
  62.     • radio group - by grouping together adjacent radio buttons
  63.     • static text
  64.     • text field
  65.     • icon
  66.     • picture
  67.     • group box - from user items and control:
  68.             title Æ name
  69.             procID = 160 Æ primary group
  70.             procID = 164 Æ secondary group
  71.     • pop up - from control:
  72.             title Æ name
  73.             value ≠ 0 Æ value
  74.             title ≠ “” and max ≠ 0 Æ name width: max
  75.             procID = 400 or 1008 Æ standard pop-up, min Æ menu resource ID used for contents:[…]
  76.             procID = 400 or 1008 and title = “” and refCon ≠ 0 Æ text field: refCon
  77.             procID = 404 or 1012 Æ resource list pop-up, refCon Æ resource type
  78.     • list box - from control:
  79.             procID = 352
  80.             value ≠ 0 Æ value
  81.     • gauge - from control:
  82.             value ≠ 0 Æ value
  83.             max - min Æ max value.
  84.  
  85. How to Use It
  86.  
  87. To use Dialog Dumper simply drop the resource file containing the dialog(s) on the Dialog Dumper application icon (or launch Dialog Dumper and select an appropriate file).  You will be presented with the following dialog (or something similar):
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111. See the Dialog Director User Guide for details of the meanings of the settings.  Make your settings and then click To Clipboard to write the script to the clipboard, or To File… to write the script to a file of your choosing.  If the script is written to a file then any existing file will be completely overwritten.  Any settings you make are preserved and re-presented the next time a file is to be processed.  Dialog Dumper stays open after processing a file so it does not need to be relaunched each time it is needed.
  112.  
  113. If the Live Mode option is selected then the script generated contains a loop that repeats until a push button in the dialog is pressed.
  114.